package com.example.librarymanagement.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.librarymanagement.dao.TypeMapper;
import com.example.librarymanagement.dto.type.TypeListDto;
import com.example.librarymanagement.entity.Type;
import com.example.librarymanagement.service.ITypeService;
import com.example.librarymanagement.vo.TypeVo;
import org.springframework.stereotype.Service;

/**
 * @author lzx
 */
@Service
public class TypeServiceImpl extends ServiceImpl<TypeMapper, Type> implements ITypeService {

    @Override
    public IPage<TypeVo> getBookType(TypeListDto typeListDto) {
        Page<TypeVo> page = new Page<>(typeListDto.getCurrent(), typeListDto.getSize());
        return baseMapper.getBookType(page, typeListDto);
    }
}
